package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.dao.StudentDao;
import com.example.entity.Student;
import com.example.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentDao studentDao;

    @Override
    public Page<Student> findAll(Page<Student> page1, LambdaQueryWrapper<Student> queryWrapper) {
        return studentDao.selectPage(page1,queryWrapper);
    }

    @Override
    public void del(String id) {
        Student student = new Student();
        student.setDeleteid(1);
        studentDao.deleteById(id);
    }
}
